//
//  ByNoticeCirclesView.m
//  caipiao_ios
//
//  Created by mc on 2018/8/10.
//  Copyright © 2018年 ZhangZhanbin. All rights reserved.
//

#import "ByNoticeCirclesView.h"

@implementation ByNoticeCirclesView

- (void)setItemsAry:(NSArray *)itemsAry{
    _itemsAry = itemsAry;
    [self.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
    
    CGFloat magin = 10;
    CGFloat width = 28;
    for (int i = 0;i < _itemsAry.count; i++) {
        ByNetModel *netModel = [_itemsAry objectAtIndex:i];
        UILabel *valueLabel = [[UILabel alloc] initWithFrame:CGRectMake(magin + i  * (width + magin),15, width, width)];
        [self addSubview:valueLabel];
        valueLabel.layer.cornerRadius = width / 2.0;
        valueLabel.text = [NSString stringWithFormat:@"%@",netModel.title];
        valueLabel.tag = 100 + i;
        valueLabel.font = FONT(14);
        valueLabel.textAlignment = NSTextAlignmentCenter;
        valueLabel.layer.masksToBounds = YES;
        valueLabel.textColor = [UIColor whiteColor];
        valueLabel.backgroundColor = netModel.themeColor;
        
    }
}

@end
